package ModelTest;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;

public class Bdd {
	public Bdd(){	
	}
	
	public void addObs(Date date, Obs obs){
		bddDate.add(date);
		bddObs.add(obs);
	}
	
	public void resizeDatabase(int dataDepth){
		
	}
	
	public Obs getObs(Date date){
		return bddObs.get(bddDate.indexOf(date));
	}
	
	public Obs getLastObs(){
		return bddObs.get(bddDate.size() - 1);
	}
	
	public String getLastDateString(){
		SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yy HH:mm");
		return sdf.format(bddDate.get(bddDate.size() - 1));
	}
	
	private ArrayList<Date> bddDate = new ArrayList<Date>();
	private ArrayList<Obs> bddObs = new ArrayList<Obs>();
}
